package com.binance.mbxgateway.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIResponse;
import com.binance.mbxgateway.vo.request.QueryAssetGasRequest;
import com.binance.mbxgateway.vo.request.QueryFeeRequest;
import com.binance.mbxgateway.vo.request.QueryUserProductFeeRequest;
import com.binance.mbxgateway.vo.request.RefreshTradingRuleRequest;

import io.swagger.annotations.Api;

@Api
@FeignClient(name = Constant.MBX_GATEWAY_SERVICE, configuration = FeignConfig.class)
public interface ITradeRuleApi {
    // 30天无日志的，认为已经废弃了-------------------------------------------------------------------------------
    // setTradingMode
    // fetchTimeRule
    // setGlobalConfig
    // useGlobalConfig
    // -------------------------------------------------------------------------------

    // -------------------------------------------------------------------------------
    // products
    // -------------------------------------------------------------------------------
    /**
     * 
     * @param request
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/mgmt/setAssetGas")
    public APIResponse<Void> setAssetGas(@RequestBody APIRequest<QueryAssetGasRequest> request) throws Exception;

    /**
     * 
     * @param request
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/mgmt/setUserProductFee")
    public APIResponse<Void> setUserProductFee(@RequestBody APIRequest<QueryUserProductFeeRequest> request)
            throws Exception;

    /**
     * 
     * @param request
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/mgmt/setFee")
    public APIResponse<Void> setFee(@RequestBody APIRequest<QueryFeeRequest> request) throws Exception;

    /**
     * 刷新交易策略
     * 
     * @throws Exception
     */
    @PostMapping(value = "/mgmt/refreshTradingRule")
    public APIResponse<Void> refreshTradingRule(@RequestBody APIRequest<RefreshTradingRuleRequest> request)
            throws Exception;
}
